package com.walkline.weibo.inf;

import com.walkline.util.StringUtility;

public class Source
{
    private String url = "";
    private String relationShip = "";
    private String name = "";

	public Source(String str)
	{
		super();

		String[] source = StringUtility.split(str, "\"");
        url = source[1];
        relationShip = source[3];
        name = StringUtility.replace(StringUtility.replaceAll(source[4], ">", ""), "</a", "");
	}

	/**
	 * 获取来源链接
	 */
	public String getUrl() {return url;}

	public void setUrl(String url) {this.url = url;}

	public String getRelationship() {return relationShip;}

	public void setRelationship(String relationShip) {this.relationShip = relationShip;}

	/**
	 * 获取文案名称
	 */
	public String getName() {return name;}

	public void setName(String name) {this.name = name;}

	public String toString()
	{
		return "\n\u2605Source [" + 
			   "\n\u2022 url = " + url + 
			   "\n\u2022 relationShip = " + relationShip +
			   "\n\u2022 name = " + name + 
			   "\n\u2022]";
	}
}